#include <iostream>
#include <memory>

#include "SingleThreadPool.hpp"
#include "Task.hpp"

using namespace std;
using namespace SingleThreadPoolMouble;

int main()
{
    ENABLE_CONSOLE_LOG;
    ThreadPool<task_t>::GetInstance()->Start();

    int cnt = 10;
    char c;
    while (true)
    {
        std::cin >> c;
        ThreadPool<task_t>::GetInstance()->Equeue(Push);
         cnt--;
        if(cnt==0) break;
         sleep(1);
    }

    ThreadPool<task_t>::GetInstance()->Stop();

    sleep(3);

    ThreadPool<task_t>::GetInstance()->Wait();
    return 0;
}